/*
 * @(#)ConnectorHolder.java $version 2010. 8. 11
 *
 * Copyright 2007-2010 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nhncorp.usf.core.invoker;

import com.nhncorp.usf.core.invoker.InvocationFuture;
import com.nhncorp.usf.core.invoker.Invoker;

/**
 * @author Web Platform Development Team
 */
public class ConnectorHolder {
    private Invoker invoker;

    public ConnectorHolder(Invoker invoker) {
        this.invoker = invoker;
    }

    /**
     * get to InvoactionFuture
     * 
     * @param boName the BO resource name
     * @param boCommand the command
     * @param params the input parameter
     * @return InvocationFuture the result object
     * @throws Exception the RequestBrokerException
     */
    public InvocationFuture invoke(String boName, String boCommand, Object... params) throws Exception {
    	return invoker.invoke(boName, boCommand, params);
    }

    /**
     * {@inheritDoc}
     */
    public void dispose() {
        if (invoker != null) {
            invoker.dispose();
        }
    }

    public Invoker getInvoker() {
        return invoker;
    }

}
